<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var money = 100;
        var flag = true;
        while (true) {
        var ope = prompt('请输入您要的操作:\n' +'1.存钱\n' + '2.取钱\n' + '3.显示余额\n' + '4.退出');
        console.log(ope);
        switch (parseInt(ope)) {
            
            case 1:
                var cun = prompt('请输入您要存的数目:');
                alert('您现在的存款余额为:' + (parseFloat(money) + parseFloat(cun)));
                
                break;
            case 2:
                var qu = prompt('请输入你要取的数目:')
                if (qu > money) {
                    alert('您的存款余额不足，请重新输入:') 
                }
                else {
                    alert('您现在的存款余额为:' + (parseFloat(money) - parseFloat(qu)));
                }
                break;
            case 3: 
                alert('您现在的存款余额为:'+ money);
                break;
            case 4:
                alert('正在退出');
                break;
            default:
                alert('请输入正确的指令');
        }
        money += parseFloat(cun);
        if (ope == 4) {
            break;
        }
    }
        
        
    </script>
</head>
<body>
    
</body>
</html>